﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class NhanVien_frmTaoDeThi : System.Web.UI.Page
{
    clsTaoDeThi taodethi = new clsTaoDeThi();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnThem_Click(object sender, EventArgs e)
    {
        string tendethi = txtTenDT.Text.Trim();
        string mamon = drlTenmon.SelectedItem.Text;
        string made = txtMaDe.Text.Trim();
        string maqt = drlQuytac.SelectedItem.Text.Trim();
        taodethi.ThemDeThi(made, maqt, mamon, tendethi);

        //te.sp_LayRDCH(3, "madtcr", "Kho");
        taodethi.TaoDeThi(made, maqt);
        GridView1.DataBind();
    }
    protected void btnSua_Click(object sender, EventArgs e)
    {

    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        txtMaDe.Text = GridView1.SelectedRow.Cells[1].Text;
        txtTenDT.Text = GridView1.SelectedRow.Cells[4].Text;
        drlQuytac.SelectedItem.Text = GridView1.SelectedRow.Cells[2].Text;
        drlTenmon.SelectedItem.Text = GridView1.SelectedRow.Cells[3].Text;
        
    }
}
